﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MyApp1.Models;

namespace MyApp1.Controllers
{
    public class VizrtController : Controller
    {
        //
        // GET: /Vizrt/

        public ActionResult Index()
        {
            return View();
        }

        public ActionResult SaveEmail()
        {
            List<Customer> model = new List<Customer>();
            model.Add(new Customer { Name = "Nursat", ID = 1 });
            model.Add(new Customer { Name = "Madhobi", ID = 2 });
            
            //throw new Exception("Testing Server Error");
            ViewData["MY.CUSTOMER.LIST"] = model;
            return View();
        }

        [HttpPost]
        public ActionResult SaveEmail(String email)
        {
            String customerEmail = Request.Form["CustomerEmail"];
            return View();
        }


        public String GetServerTime(String format)
        {
            String currentTime = DateTime.Now.ToString(format);//("dd MMMM yyyy hh:mm:ss tt");           
            return currentTime;
        }
    }
}
